﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ChatForum.Database
{
    class DatabaseFactory
    {
        private const string SqlServerDataSource = "localhost";
        private const string SqlServerDatabase = "ChatForum";
        private const string UserId = "commonId";
        private const string Password = "commonPassword";
        private const string StartupScriptPath = null;

        public static DatabaseBase GetDatabase(DatabaseENUM dbType)
        {
            switch (dbType)
            {
                case DatabaseENUM.SqlServer:
                    return new SqlServerDatabase(SqlServerDataSource, SqlServerDatabase, UserId, Password, StartupScriptPath);
                default:
                    throw new ArgumentException("Invalid Database Type");
            }
        }
    }
}
